package com.wty.design.structural.decorator.v1;

/**
 * @Author wangtengyu
 * @Create 2018-09-19-9:51
 * 这样有弊端，我想加10个蛋，10个肠。就需要创建相应的类 10*10的组合就是100个类，类会爆炸。
 * 一个煎饼就对应一个类。
 *
 */
public class Test {

    public static void main(String[] args) {
        BatterCake batterCake=new BatterCake();
        System.out.println(batterCake.getDescription()+"销售价格"+batterCake.cost());

        BatterCake batterCakeWithEgg=new BatterCakeWithEgg();
        System.out.println(batterCakeWithEgg.getDescription()+"销售价格"+batterCakeWithEgg.cost());

        BatterCake batterCakeWithSausage=new BatterCakeWithSausage();
        System.out.println(batterCakeWithSausage.getDescription()+"销售价格"+batterCakeWithSausage.cost());

    }
}
